/*****************************************************************************
Copyright 2006 Kervin L. Pierre
    EMAIL: otlkcon@adevsoft.com

This file is part of Otlkcon.

Otlkcon is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

Otlkcon is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Lesser GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License
along with Otlkcon; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*******************************************************************************/

#pragma once

#include "stdafx.h"

#include <string>

using namespace std;

//! This class represents a single calendar component as retrieved from a foreign calendar

//! The core internal language for this message stores calendar functionality is the
//! iCalendar format [ RFC2445 ].  The 'hash' and 'name' fields give us unique
//! information so we can map that calendar message object to MAPI IMessage objects.
typedef struct otlkcon_calendar_component_
{
    wchar_t       hash[MAX_PATH];
    wchar_t       name[MAX_PATH];

    int           status;
    int           type;
    ULONG         dataSize;

    union dataType
    {
        BYTE          bytes[1];
        LPBYTE        pBytes;
        icalcomponent *comp;
    } data;
} otlkcon_calendar_component;

typedef struct otlkcon_calendar_component_array_
{
    ULONG count;
    ULONG size;
    BYTE bytes[1];
} otlkcon_calendar_component_array;